package net.xumf.service.master.impl;

import net.xumf.dao.master.LoggingEventExceptionRepository;
import net.xumf.dao.master.LoggingEventPropertyRepository;
import net.xumf.dao.master.LoggingEventRepository;
import net.xumf.domain.master.LoggingEvent;
import net.xumf.service.master.LoggingEventService;
import net.xumf.support.common.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class LoggingEventServiceImpl extends BaseServiceImpl<LoggingEventRepository, LoggingEvent, Long> implements LoggingEventService {


    @Autowired
    private LoggingEventExceptionRepository loggingEventExceptionRepository;

    @Autowired
    private LoggingEventPropertyRepository loggingEventPropertyRepository;

    @Override
    @Transactional
    public void removeAll() {

        loggingEventExceptionRepository.deleteAll();
        loggingEventPropertyRepository.deleteAll();
        repository.deleteAll();
    }

/*    @Override
    public void remove(Long pojoId) {
        LoggingEventExceptionIdentity loggingEventExceptionIdentity = new LoggingEventExceptionIdentity();
        loggingEventExceptionIdentity.setLoggingEvent();
        loggingEventExceptionRepository.deleteByEventId(pojoId);
        super.remove(pojoId);
    }

    @Override
    public void remove(LoggingEventDTO dto) {
        loggingEventExceptionRepository.LoggingEventExceptionIdentity(dto.getEventId());
        super.remove(dto);
    }*/
}
